<?php
include 'conn.php';

$pid = $_GET['projectId'];
$pidsql = "select StudentName,StudentId,Major,Class,s.Tel,s.email,ProjectName,time,TeacherName,t.Tel from project as p
join teacher as t on p.Teacher_TeacherId=TeacherId
  join student as s on s.StudentId=p.Student_StudentId
WHERE ProjectId=$pid";

$pidresult = $conn->query($pidsql);
$pidrow = $pidresult->fetch_array();

?>
<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选课信息</title>
    <link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">
    <link rel="stylesheet" type="text/css" href="css/nav.css">
    <link rel="stylesheet" type="text/css" href="fonts/iconfont.css">
    <link rel="stylesheet" href="css/bootstrap-theme.css"/>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <link rel="stylesheet" href="css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="css/bootstrap.css"/>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
<!---->
<!--    <link rel="stylesheet" type="text/css" href="css/style.css">-->

    <style>
        .keti{
            margin-top:0px;
            padding-top: 50px;
            border: 0;

        }
        .keti table {
            width: 50%;
            table-layout: fixed;

        }

        .keti td:nth-child(1) {
            width: 20%;
            text-align: center;
        }

        .keti  td:nth-child(2) {
            width: 35%;
        }

        .keti td:nth-child(3) {
            width: 10%;
            text-align: center;
        }

        .keti  td:nth-child(4) {
            width: 35%;
        }

        .keti  input {
            border: none;
            width: 100%;
        }

        .keti textarea {
            border: none;
            width: 100%;
        }
        @media screen and (max-width: 900px) {

            .keti td{
                font-size:6px;
            }
        }
        @media screen and (max-width: 500px) {
            .keti td{
                font-size:3px;
            }
        }

    </style>
    <script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
    <script>
        function choosub(projectId) {
            var Id = projectId;
            var text = document.getElementById('mask').value;
            $.ajax({
                type: "POST",
                url: "chooseTask.php",
                data: "StduentId=<?=$sidrow[1]?>" + "&ProjectId=" + Id + "&intention=" + text + "&method=choose",
                success: function (msg) {
                    alert(msg);
                    window.location.href = "h-student/teachresearch.php";
                }
            });
        }
    </script>
</head>

<body >


<div class="panel-default auto keti" align="center">

    <h3 >选课信息</h3>

    <table border="1px"  class="table table-striped">
        <tr style="background-color: #f0f8ff">
            <td style="border: 0" colspan="4">学生</td>

        </tr>
        <tr>
            <td style="background-color: #f0f8ff">姓名</td>
            <td><?= $pidrow[0] ?></td>
            <td style="background-color: #f0f8ff">学号</td>
            <td><?= $pidrow[1] ?></td>
        </tr>
        <tr>
            <td style="background-color: #f0f8ff">专业</td>
            <td><?= $pidrow[2] ?></td>
            <td style="background-color: #f0f8ff">班别</td>
            <td><?= $pidrow[3] ?></td>
        </tr>
        <tr>
            <td style="background-color: #f0f8ff">联系电话</td>
            <td colspan="3"><?= $pidrow[4] ?></td>
        </tr>
        <tr>
            <td style="background-color: #f0f8ff">E-MAIL</td>
            <td colspan="3"><?= $pidrow[5] ?></td>
        </tr>
        <tr>
            <td style="background-color: #f0f8ff">选题名称</td>
            <td colspan="3"><?= $pidrow[6] ?></td>
        </tr>
        <tr>
            <td style="background-color: #f0f8ff">选课意向</td>
            <td colspan="3"><textarea id="mask" style="resize:none;background-color: #f9f9f9" readonly=true  ></textarea></td>
        </tr>
        <tr style="background-color: #f0f8ff">
            <td style="border: 0" colspan="4">指导教师</td>
        </tr>
        <tr>
            <td style="background-color: #f0f8ff">确定选题</td>
            <td><?=$pidrow[6]?></td>
            <td style="background-color: #f0f8ff">完成时间</td>
            <td><?=$pidrow[7]?></td>
        </tr>
        <tr>
            <td style="background-color: #f0f8ff">指导老师</td>
            <td><?=$pidrow[8]?></td>
            <td style="background-color: #f0f8ff">联系电话</td>
            <td><?=$pidrow[9]?></td>
        </tr>

    </table>

</div>




<script>
    window.jQuery || document.write('<script src="js/jquery-1.11.0.min.js"><\/script>')
</script>

<script type="text/javascript" src="js/nav.js"></script>
<script type="text/javascript" src="layer/layer.js"></script>

</body>

</html>




























